package u13.ejercicio18;

import java.awt.Graphics;
import java.util.ArrayList;
import java.util.Collection;

import javax.swing.JPanel;

public class MiPanelDibujo extends JPanel{
	
	private Collection<IFigura> figuras;
	private int posX;
	private int posY;
	
	public void setPosX(int posX) {
		this.posX = posX;
	}

	public void setPosY(int posY) {
		this.posY = posY;
	}

	public MiPanelDibujo(){
		figuras=new ArrayList<IFigura>();
	}
	
	public Collection<IFigura> getFiguras() {
		return this.figuras;
	}

	public void paint(Graphics g){
		super.paint(g);
		for(IFigura f: figuras){
			f.pintar(g);
		}
	}
	
}
